<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .ul1{
            border: 1px;
            background-color: #ffc0cb;
            display: flex;
            list-style-type: none;
        }

        .item{
            width: 80px;
            height: 50px;
            background-color: #ffc0cb;
            font-size: 16;
            text-align: center;
            line-height: 50px;
            color: white;
        }

        .ul1 :hover{
            background: #008000;
            color: white;
        }

        .item>a{
            text-decoration: none;
            color: white;
        }
    </style>
</head>
<body>
    <ul class="ul1">
        <li class="item"><a href="#">新闻1</a></li>
        <li class="item"><a href="#">新闻2</a></li>
        <li class="item"><a href="#">新闻3</a></li>
        <li class="item"><a href="#">新闻4</a></li>
        <li class="item"><a href="#">新闻5</a></li>
        <li class="item"><a href="#">新闻6</a></li>
        <li class="item"><a href="#">新闻7</a></li>
        <li class="item"><a href="#">新闻8</a></li>
    </ul>
</body>
</html>